module Manager {
    
    export class Background extends Laya.Sprite {
        public static imageWidth: number = 480;
        public static imageHeight: number = 852;

        private box: Laya.Sprite;
        private bg1: Laya.Sprite;
        private bg2: Laya.Sprite;

        constructor () {
            super();

            this.box = new Laya.Sprite();
            this.addChild(this.box);

            this.bg1 = new Laya.Sprite();
            this.bg1.texture = Laya.loader.getRes("res/background.png");
            this.box.addChild(this.bg1);

            this.bg2 = new Laya.Sprite();
            this.bg2.texture = Laya.loader.getRes("res/background.png");
            this.bg2.pos(0, -Background.imageHeight);
            this.box.addChild(this.bg2);

        }

        
        public startOrRestart() {

        }

        public onLoop(): void {
            this.box.y += 1;
            if (this.box.y >= Background.imageHeight) {this.box.y = 0;}
        }

        public pause() {

        }

        public resume() {

        }

        public stop() {

        }
    }

}